package edu.ynu.se.xiecheng.achitectureclass.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;

@Entity
@Getter
@Setter
@Where(clause = "is_deleted = 0")
public class Statistic extends LogicEntity {

    @Column
    private String statisticName;
    @Column
    private Long statisticValue;
    @Lob
    private byte[] statisticPhoto;

    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"statistics"})
    private Device device;

}
